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TD872xy57/ajh86YV3yb4+78D/aUl
5I4JUvkqcayVlxVDmpU0sppq5M4u8t/iiB8TvGmi2utG0j4xSLGKSM03WL+rWdA=
-----END CERTIFICATE-----
_EOF_






#!/bin/bash

DOMAIN=docker.io

mkdir -p /etc/docker/certs.d/$DOMAIN

cat > /etc/docker/certs.d/$DOMAIN/registry.crt <<_EOF_
-----BEGIN CERTIFICATE-----
MIIC+zCCAeOgAwIBAgIJAMu4jynOVopuMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
BAMMCWRvY2tlci5pbzAeFw0xNjEyMTQwNDM3NTZaFw0yNjEyMTIwNDM3NTZaMBQx
EjAQBgNVBAMMCWRvY2tlci5pbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAJtmxoyYa7USCVrZTMCpQ5/NeW0r63ey/EUXnm1NqpalpvNqXDUggGNUQ3V5
LJdkcHBO/PN06V52CKr7f2eyyufxg+oS3QTmyCO304vXcLVs4z3Vrq4z3185jYin
NceLGOsSX/4a6MQstrtC4Y5OaaPhrBi0OtNam6X4qF0sZc0G6hsMHKj1NcB4cJCT
PlE0wGi3dxA1hp74dcJMDanc8M0TzLzHtw9Mf4i36YQuUm1lkcQTDOO4hd9o5tuu
9UX147sathYjDIHvtIW8RwxT9LPL+5VIqoJqMyZ8YLViCYLEUUPGgsRf1RPbo7qn
MJUybhMX3dUPmTedndk5Jl5ydaMCAwEAAaNQME4wHQYDVR0OBBYEFG2h0vPJnbih
xioQf+d+jw7mecAxMB8GA1UdIwQYMBaAFG2h0vPJnbihxioQf+d+jw7mecAxMAwG
A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHVe8VXcGHLLFXdICBxwzvWw
bC7fvnYTbn/mHhyEPdNiJ+miu0rlGWh4BasrGDxcGoBD2Ctu+AMBJve7Y4PU/gSc
KFM/o2xto5XLSzsAAEk89LNlZjaEIXFi4UNL7RdEovA83jh55jvB9BFbyCj6lUfb
GUoVgbGhYt8+/eV31ytO5d03EAN+old7PMQzqn0qVPfFIFm9lSLTy2XCyIHkokAT
FEN88lfx5dwVh/0wLzcHtviljrmB+1wG+le6eQoJTbjjUF6jAwqbprqwSxcZIO8g
SRJ6nKz9f2oMIV4Y71IEAmP++tATxYJ96BviDPTIyEtqwG9MWGGjmM4zFLu6Auo=
-----END CERTIFICATE-----
_EOF_


# acer
#!/bin/bash

DOMAIN=dishui.io:5000

mkdir -p /etc/docker/certs.d/$DOMAIN

cat > /etc/docker/certs.d/$DOMAIN/registry.crt <<_EOF_
-----BEGIN CERTIFICATE-----
MIIC+zCCAeOgAwIBAgIJAJApzgVJoJG8MA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
BAMMCWRpc2h1aS5pbzAeFw0xNjA4MzAxNTEzNTRaFw0yNjA4MjgxNTEzNTRaMBQx
EjAQBgNVBAMMCWRpc2h1aS5pbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAK9llX3hxXb8DckEk8t8OIJRMV5r1+4miEAbr3smDOU2/ZiZyTrMmGJ5lTgH
HDSkhpVS5mibwsRNlfB3ZZaM+DLyNTCF+S4AhN9yBoE8ycgtKBLRgQTHIo/sytyG
WPZY0Vt9b7hVFTUIqj5BZM66YxBtcUD2kXCMyKwz3iCY8H04Yn4NHztA8lkFT3/T
SfYmN5Q4cyjj59Ec1U188p/I1hH5j8m5l1WC4IifZGYW4OihgW1agVNZSgSY9LqF
BdxXfK6HfdxU/OvbVF+ct9Zn5z97mdkVVmRhPFpBD0pV028YTN+knf9z7IKKc8sI
fveZfnxa+YDXk6V/NMFWhcCggBsCAwEAAaNQME4wHQYDVR0OBBYEFFexAcnzlZDg
RKfkmNQaexKG31rkMB8GA1UdIwQYMBaAFFexAcnzlZDgRKfkmNQaexKG31rkMAwG
A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACcMJAtLNbRCpPRBmYQPrVxg
CKEwTTLZHqAIU7Q4aF6VHVmj20VS9Z75S2XR4Wp4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